package com.speljohan.rsbot.event.events;

import java.awt.Graphics;
import java.util.EventListener;

import com.speljohan.rsbot.event.EventMulticaster;
import com.speljohan.rsbot.event.listeners.PaintListener;

/**
 * A paint event is only valid when it is being dispatched.
 * */
public class PaintUpdateEvent extends RSEvent {
	private static final long serialVersionUID = -7404828108740551228L;
	public Graphics graphics;

	@Override
	public void dispatch(final EventListener el) {
		((PaintListener) el).onRepaint(graphics);
	}

	@Override
	public long getMask() {
		return EventMulticaster.PAINT_EVENT;
	}
}
